package comprehensive_case;

public class 计算每个季度的营业额和全年的营业额 {
    public static void main(String[] args) {
        int[][] arr = {
                { 22, 66, 44 },
                { 77, 33, 88 },
                { 25, 45, 65 },
                { 11, 66, 99 }
        };
        int yearnum = 0;
        for (int i = 0; i < arr.length; i++) {
            int jidunum = 0;
            for (int j = 0; j < arr[i].length; j++) {
                jidunum += arr[i][j];
                yearnum += arr[i][j];
            }
            System.out.println("第" + (i + 1) + "个季度的营业额是" + jidunum);
        }
        System.out.println("全年的营业额是" + yearnum);
    }
}
